#include "extdlg.h"
#include "ui_extdlg.h"

ExtDlg::ExtDlg(QWidget *parent) :
    QDialog(parent),
    ui(new Ui::ExtDlg)
{
    ui->setupUi(this);
    ui->groupBox_2->hide();
    ui->groupBox_3->hide();
    layout()->setSizeConstraint(QLayout::SetFixedSize);
    setColumnRange('A', 'Z');

}

void ExtDlg::setColumnRange(QChar first, QChar last){
    ui->cbxPrimaryCol->clear();
    ui->cbxSecondaryCol->clear();
    ui->cbxTertiaryCol->clear();

    ui->cbxTertiaryCol->addItem(tr("None"));
    ui->cbxSecondaryCol->addItem(tr("None"));
    ui->cbxPrimaryCol->setMinimumSize(ui->cbxSecondaryCol->sizeHint());

    QChar ch = first;
    while(ch < last){
        ui->cbxPrimaryCol->addItem(QString(ch));
        ui->cbxSecondaryCol->addItem(QString(ch));
        ui->cbxTertiaryCol->addItem(QString(ch));
        ch = ch.unicode() + 1;
    }
}

ExtDlg::~ExtDlg()
{
    delete ui;
}